package com.hdax.dm.order.controller;

import com.hdax.dm.entity.order.OrderLinkUser;
import com.hdax.dm.order.dto.OrderDto;
import com.hdax.dm.order.feign.LinkUserFeign;
import com.hdax.dm.order.service.OrderDtoService;
import com.hdax.dm.order.service.OrderLinkUserService;
import com.hdax.dm.order.service.OrderService;
import com.hdax.dm.token.TokenUtil;
import com.hdax.dm.utils.CommonResponse;
import com.hdax.dm.utils.ResponseUtil;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping(path = "/order")
public class OrderBuyerController {

    @Autowired
    private OrderDtoService orderLinkUserService;

    @PostMapping("pay/confirmpay")
    public CommonResponse confirmpay(@RequestBody Map<String,Long> params){
        Long orderId=params.get("orderNo");
        return ResponseUtil.returnSuccess(orderLinkUserService.selectByUser(orderId));
    }

}
